projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83ae392
)
Fix out of bounds bitmap access on Haiku
author
Po Lu
<luangruo@yahoo.com>
Fri, 14 Jan 2022 01:24:34 +0000
(
01:24
+0000)
committer
Po Lu
<luangruo@yahoo.com>
Fri, 14 Jan 2022 01:24:34 +0000
(
01:24
+0000)
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
out of bounds access to bitmap data.
src/haiku_draw_support.cc
patch
|
blob
|
history
diff --git
a/src/haiku_draw_support.cc
b/src/haiku_draw_support.cc
index 5d355ac205800ea768e15fcf7aabca4d1c9b423a..270a619b89b9ac43104d3f1c54ced5ca8f00b95a 100644
(file)
--- a/
src/haiku_draw_support.cc
+++ b/
src/haiku_draw_support.cc
@@
-313,7
+313,7
@@
BView_DrawBitmapWithEraseOp (void *view, void *bitmap, int x,
BRect bounds = bc.Bounds ();
for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y)
{
- for (int x = 0; x <
=
BE_RECT_WIDTH (bounds); ++x)
+ for (int x = 0; x < BE_RECT_WIDTH (bounds); ++x)
{
if (bits[y * (stride / 4) + x] == 0xFF000000)
bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color);